<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title></title>
    <style>
    * {
      box-sizing: border-box;
    }
    .father {
      width: 650px;
      height: 250px;
      background-color: pink;
      display: flex;
    }
    .justify-center {
      justify-content: space-between;
    }
    .center {
      align-items: center;
    }
    .flex-start {
      align-items: flex-start;
    }
    .flex-end {
      align-items: flex-end;
    }
    .stretch {
      align-items: stretch;
    }
    .son {
      width: 200px;
      height: 200px;
      background-color: orange;
      border: 2px dashed yellow;
    }
    .zero-height {
      height: 0;
    }
    .no-setting-height {
      width: 200px;
      background-color: orange;
      border: 2px dashed yellow;

    }
    </style>
    <link href="css/style.css" rel="stylesheet">
  </head>
  <body>
    <h2>start</h2>
    <div class="father flex-start">
      <div class="son"></div>
      <div class="son"></div>
      <div class="son"></div>
    </div>
    <h2>center</h2>
    <div class="father center">
      <div class="son"></div>
      <div class="son"></div>
      <div class="son"></div>
    </div>
    <h2>end</h2>
    <div class="father flex-end">
      <div class="son"></div>
      <div class="son"></div>
      <div class="son"></div>
    </div>
    <h2>stretch</h2>
    <div class="father stretch">
      <div class="son"></div>
      <div class="son"></div>
      <div class="son"></div>
    </div>
    <h2>default</h2>
    <div class="father">
      <div class="son"></div>
      <div class="son"></div>
      <div class="son"></div>
    </div>
    <hr>
    <h2>stretch while sons without setting height</h2>
    <div class="father stretch">
      <div class="no-setting-height"></div>
      <div class="no-setting-height"></div>
      <div class="no-setting-height"></div>
    </div>
    <h2>start while sons without setting height</h2>
    <div class="father flex-start">
      <div class="no-setting-height"></div>
      <div class="no-setting-height"></div>
      <div class="no-setting-height"></div>
    </div>
    <h2>default while sons without setting height</h2>
    <div class="father">
      <div class="no-setting-height"></div>
      <div class="no-setting-height"></div>
      <div class="no-setting-height"></div>
    </div>
    <hr>
    <h2>stretch while sons with zero height</h2>
    <div class="father stretch">
      <div class="son zero-height"></div>
      <div class="son zero-height"></div>
      <div class="son zero-height"></div>
    </div>
    <hr>
    <h2>同时设置主轴和侧轴</h2>
    <div class="father center justify-center">
      <div class="son"></div>
      <div class="son"></div>
      <div class="son"></div>
    </div>

  </body>
</html>
